package com.wkbb.common.enums;

/**
 * @author luowenyan
 * 审核状态: 1:待审核，2:审核通过; 0:审核不通过
 */
public enum AuditStatusEnum {

    /**
     * 待审核
     */
    TO_BE_AUDITED(1,"待审核"),

    /**
     * 审核通过
     */
    AUDIT_AND_APPROVAL(2,"审核通过"),

    /**
     * 审核不通过
     */
    AUDIT_FAILED(0,"审核不通过");

    private AuditStatusEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private Integer value;

    private String desc;

    public Integer getValue() {
        return this.value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDesc() {
        return this.desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDesc(Integer value) {
        for (AuditStatusEnum auditStatus : AuditStatusEnum.values()) {
            if (auditStatus.getValue().intValue()==value) {
                return auditStatus.getDesc();
            }
        }
        return null;
    }
}
